-
Notifications
You must be signed in to change notification settings - Fork 97
Use Linux scripts to configure Arista cEOS containers #3051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add 'netlab_config_wrapper' and 'netlab_config_mode' to EOS clab
definition to turn configuration snippets into FastCli scripts
Changes in device configs:
* Fix weird EOS OSPFv3 configuration template typo
* Fast change in interface state confuses Arista cEOS. The EOS
"spooky action at a distance" has to be disabled for cEOS
containers
* Add 'sleep 2' to bgp.session configuration before clearing the
BGP sessions to give BGP time to start
* Wrong comment character ("#" instead of "!") in STP template
* Unsupported command (ip virtual-router mac-address mlag-peer)
in LAG template
Also:
* Transformation test results have changed for tests that include
cEOS containers with netlab_config_mode == 'sh'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates Arista cEOS (containerlab) configuration handling to optionally deploy configuration snippets as FastCli-executed Linux scripts, and fixes several EOS template issues/caveats and test expectations.
Changes:
- Add EOS cEOS
clab.group_varssupport for script-wrapping rendered configs (FastCli wrapper + config path). - Adjust EOS templates for cEOS/script-mode behavior (BGP session delay, STP comment markers, OSPFv3 typo fix, remove unsupported LAG command, disable “spooky action” behavior).
- Update topology transformation tests and documentation to reflect the new script-based config option.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/topology/input/vxlan-router-stick.yml | Enables netlab_config_mode: sh for EOS cEOS in the test topology input. |
| tests/topology/expected/vxlan-router-stick.yml | Updates expected transformed output to include script-mode config templates, binds, and skip lists. |
| netsim/extra/bgp.session/eos.j2 | Adds a small delay before clearing BGP sessions when generating shell scripts. |
| netsim/devices/eos.yml | Introduces FastCli wrapper + config path for cEOS script-based config deployment. |
| netsim/ansible/templates/stp/eos.j2 | Fixes EOS STP template comment delimiters and separators. |
| netsim/ansible/templates/ospf/eos.ospfv3.j2 | Fixes a Jinja syntax typo in the EOS OSPFv3 template. |
| netsim/ansible/templates/normalize/eos.j2 | Adds cEOS/script-mode interface command to disable phy control-frame behavior. |
| netsim/ansible/templates/lag/eos.j2 | Removes an unsupported EOS command from the LAG template. |
| docs/caveats.md | Documents cEOS script-based configuration option and reorganizes EOS caveats. |
Comments suppressed due to low confidence (1)
netsim/ansible/templates/normalize/eos.j2:10
- The loop variable is
intf, but the MAC address block referencesl.mac_address; as a result the condition will always be false and the MAC address (when present) will never be rendered. Useintf.mac_address(or rename the loop variable tol) consistently.
{% endif %}
{# 'no switchport' allocates an internal VLAN in range 1006-, causing issues when overlapping with topology vlans #}
shutdown
{% if l.mac_address is defined %}
mac-address {{ l.mac_address }}
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
DanPartelly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works flawlessly, and the startup time for a topology with 4 cEOS devices decreased by ~47%.
This will become my new default as soon as it lands in dev.
So glad to hear you like it. Thanks a million.
Getting there as soon as we get past #3049 (hint, hint 😎) |
Add 'netlab_config_wrapper' and 'netlab_config_mode' to EOS clab definition to turn configuration snippets into FastCli scripts
Changes in device configs:
Also: